package jaux.message.codec;

import java.util.Arrays;
import java.util.List;

import jaux.message.codec.utils.ByteUtil;

public class BytesMessage {
	
	private byte[] bytes ;
	
	public BytesMessage subBytes(int start, int end) {
		this.bytes = Arrays.copyOfRange(this.bytes, start, end);
		return this;
	}
	
	public BitsMessage subBits(int start, int end) {
		return new BitsMessage(Arrays.copyOfRange(ByteUtil.convertBytesToBitArray(this.bytes), 7 - start, 8 - end));
	}

}
